package com.zzw.bridge.business.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zzw.bridge.business.dto.FileReportQueryDTO;
import com.zzw.bridge.business.dto.LikeFileDTO;
import com.zzw.bridge.business.vo.FileReportQueryVo;
import com.zzw.bridge.common.entitys.business.ZzwFileReportAssociationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 点云文件与墩柱报告关系表
 *
 * @author XiaoJie
 * @email
 * @date 2025-05-16 11:44:33
 */
@Mapper
public interface ZzwFileReportAssociationDao extends BaseMapper<ZzwFileReportAssociationEntity> {

    /**
     * 分页查询文件报表信息
     *
     * @param dto {@link FileReportQueryDTO } "查询条件"
     * @return {@link Page < FileReportQueryVo >}
     */
    Page<FileReportQueryVo> selectByPage(Page<FileReportQueryVo> page, @Param("dto") FileReportQueryDTO dto);

    /**
     * 批量保存
     *
     * @param list "条件"
     * @return {@link long}
     */
    long insertBatchByList(@Param("list") List<ZzwFileReportAssociationEntity> list);

    /**
     * 根据文件后缀获取所有文件信息
     *
     * @param dto {@link LikeFileDTO}
     * @return {@link List<FileReportQueryVo>}
     */
    List<FileReportQueryVo> selectAllByFileSuffix(@Param("dto") LikeFileDTO dto);
}
